import web
import settings

web.config.debug = True
urls = settings.urls
app = web.application(urls, globals())

if __name__ == "__main__":
    app.run()
else:
    import sae
    app = app.wsgifunc()
    application = sae.create_wsgi_app(app)